home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / CGI shell / simple.4th < prev    next >
Text File  |  1995-09-25  |  1KB  |  33 lines

  1.    \ Simple CGI
  2.    
  3.    --> CGIshell.4th    ( load the CGI code )
  4.     
  5.    message[ s1 You are: ]                 ( strings used in the reply )
  6.    message[ s2 <br>Using: ]
  7.    message[ s3 <br>And your favorite flavor is: ]
  8.    
  9.    message[ fname flavor]        ( name of the field )
  10.    
  11.    512 String>> out    ( return string goes here, 512 char max )
  12.    out newstr          ( clear it )
  13.    
  14.    ,s sdoc  ,s WWWΩ  ae:   ( begin the AppleEvent reply handler )
  15.    
  16.       out startstring          ( add HTML header )
  17.       
  18.       s1 out strcpy            ( add 'You are: ' )
  19.       out APPEND @Addr         ( add client's IP address )
  20.       
  21.       s2 out strcpy            ( add '<br>Using: ' )
  22.       out APPEND @Browser      ( add browser type  )
  23.       
  24.       s3 out strcpy            ( add '<br>And your favorite flavor is: ' )
  25.       out fname APPEND @Field  ( add flavor field data )
  26.       
  27.       out endstring            ( add HTML ending )
  28.       
  29.       out REPLY  bye           ( send the reply and quit )
  30.       
  31.    ;ae                    ( end reply handler )
  32.    
  33.